<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('关联性要素设置')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId1">
                <div class="select-list">
                    <ul>

                        <li>
                            <input type="text" placeholder="请输入要素名称" name="aCname"/>
                        </li>
                       <!-- <li>
                            <p>创建时间：</p>
                            <input name="params[aTime]" readonly data-type="datetime" data-format="yyyy-MM-dd HH:mm:ss" placeholder="" class="form-control time-input-two" type="text"  required>
                        </li>-->
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm"
                               onclick="$.table.search('formId1', 'bootstrap-table1')"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm"
                               onclick="$.form.reset('formId1', 'bootstrap-table1')"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>


        </div>


        <div class="" id="toolbar1" role="group">
            <a class="btn btn-success" onclick="$.operate.add()">
                <i class="fa fa-plus"></i> 新建
            </a>

        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table1"></table>
        </div>
    </div>
</div>

<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:wzs:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:wzs:remove')}]];
    var prefix = ctx + "system/glx";

    $(function () {
        //破坏
        var options = {
            url: prefix + "/list?c_type=4",
            createUrl: prefix + "/add?c_type=4",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "关联性要素",
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            showSearch: false,
            id:'bootstrap-table1',
            formId:'formId1',
            toolbar:'toolbar1',
            columns: [{
                checkbox: true
            }, {
                title: "序号",
                formatter: function (value, row, index) {
                    return $.table.serialNumber(index);
                }
            },

                {
                    field: 'aCname',
                    title: '要素名称'
                },
                {
                    field: 'createTime',
                    title: '创建时间'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.aCid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.aCid + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>